Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit e1b9a462194761471b48045eee5cca477bea7f81


Parents : 59a4a60
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-11-25T13:48:37+01:00

Attempt local compile on windows if no filterlib

Changes

1 files changed, 5 insertions(+), 6 deletions(-)


Diff

diff --git a/LXST/Filters.py b/LXST/Filters.py
index c5c870d..19804ef 100644
--- a/LXST/Filters.py
+++ b/LXST/Filters.py
@@ -20,12 +20,11 @@ else:
# for now due to strange linking behaviour,
# but allow local compilation if the user has
# a C compiler installed.
- if not RNS.vendor.platformutils.is_windows():
- filterlib_spec = find_spec("LXST.filterlib")
- if not filterlib_spec or filterlib_spec.origin == None: raise ImportError("Could not locate pre-compiled LXST.filterlib module")
- with open(os.path.join(c_src_path, "Filters.h"), "r") as f: ffi.cdef(f.read())
- native_functions = ffi.dlopen(filterlib_spec.origin)
- USE_NATIVE_FILTERS = True
+ filterlib_spec = find_spec("LXST.filterlib")
+ if not filterlib_spec or filterlib_spec.origin == None: raise ImportError("Could not locate pre-compiled LXST.filterlib module")
+ with open(os.path.join(c_src_path, "Filters.h"), "r") as f: ffi.cdef(f.read())
+ native_functions = ffi.dlopen(filterlib_spec.origin)
+ USE_NATIVE_FILTERS = True
except Exception as e:
RNS.log(f"Could not load pre-compiled LXST filters library. The contained exception was: {e}", RNS.LOG_WARNING)


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────